import { Avatar, Space } from "antd";
import { UserOutlined } from "@ant-design/icons";

import personFemale from "../../assets/images/person_female.png";
import personMale from "../../assets/images/person_male.png";

const TreePersonItem = ({ data, selectNode }) => {
    return (
        <Space
            size={0}
            direction="vertical"
            key={data.id}
            style={{ backgroundColor: selectNode?.id === data.id ? "#eee" : "#fff", fontSize: 12, width: "auto", padding: "10px 16px" }}
        >
            <Avatar shape="square" src={data.staff?.osRoge === "男" ? personMale : personFemale} size={48} style={{ color: "#000", backgroundColor: "#fff" }} />
            <div style={{ fontSize: 15, marginTop: 5 }}>{data.staff?.osName}</div>
            <div style={{ color: "#999" }}>{data.position?.opName}</div>
        </Space>
    );
};

export default TreePersonItem;
